package com.meet.dao;

import com.meet.entity.Department;

import java.sql.SQLException;
import java.util.List;

/**
 * @author RicardoZeng
 * @date 2022/8/11 19:21
 */

public interface DepartmentDao {

    /**
     * 获取所有部门
     * @return
     * @throws SQLException
     */
    public List<Department> getAllDepartment(int currentpage, int rows) throws SQLException;

    /**
     * 添加部门
     * @param department
     * @return
     * @throws SQLException
     */
    public int addDepartment(Department department) throws SQLException;

    /**
     * 删除部门
     * @param Id
     * @return
     * @throws SQLException
     */
    public int delDepartment(Integer Id) throws SQLException;

    /**
     * 修改部门
     * @param department
     * @return
     * @throws SQLException
     */
    public int updateDepartment(Department department) throws SQLException;

    /**
     * 根据Id查部门
     * @param Id
     * @return
     * @throws SQLException
     */
    public Department getDptId(Integer Id) throws SQLException;

    /**
     * 表中记录数
     * @return
     * @throws SQLException
     */
    public int count() throws SQLException;

    /**
     * 得到所有的dep
     * @return
     * @throws SQLException
     */
    public List<Department> getDptName() throws SQLException;


}
